package com.grj.es.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @author 14505
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(indexName = "products")
public class Products {


    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    @Field(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word", type = FieldType.Text, copyTo = "all")
    private String name;

    @Field(type = FieldType.Keyword)
    private String type;

    @Field(analyzer = "ik_max_word", searchAnalyzer = "ik_max_word", type = FieldType.Text, copyTo = "all")
    private String description;

    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String all;

}
